package com.example.deploysinggle.test1.common.conveter;

import com.example.deploysinggle.test1.interface1.ABC;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2024/12/26 12:22
 */
@Mapper
public interface ConverterExample {
    ConverterExample INSTANCE = Mappers.getMapper(ConverterExample.class);
    @Mapping(target = "aa",source = "dd")
    //expression 可以写java 代码  但是  里面的类必须是包名全路径 否则识别不到
    @Mapping(target = "aa",expression = "java()")
    ABC converterFromAa(ABC.Aa aa);
}
